# coding=utf-8
"""
Author: Mr.夏末
@Function: 功能名称
"""

# 相对路径: 相对运行入口的路径
import os
import sys

f = open('../lib/mm.jpg',mode='rb')
f.close()

# 获取项目绝对路径
path= os.path.abspath(__file__)
print(path)
# 明确入口的名字进行截取
path = path[:path.find('class14\demo01.py')-1]
print(path)


print("---------------------------------")
print(sys.path[0])
# /Users/s/PycharmProjects/dr_check

print(os.getcwd())
# /Users/s/PycharmProjects/dr_check

print(os.path.realpath(__file__))
# /Users/s/PycharmProjects/dr_check/main.py

print(os.path.split(os.path.realpath(__file__)))
# ('/Users/s/PycharmProjects/dr_check', 'main.py')

